Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@tiptap/extension-heading
Advanced tools
@tiptap/extension-heading is an extension for the Tiptap text editor that allows you to add and manage heading elements in your rich text content. It provides a straightforward way to include headings of various levels (e.g., H1, H2, H3) in your editor, making it easier to structure and format your text.
Add Heading
This feature allows you to add heading elements to your Tiptap editor. You can configure which heading levels are available (e.g., H1, H2, H3).
const editor = new Editor({
extensions: [
Heading.configure({
levels: [1, 2, 3],
}),
],
})
Set Heading Level
This feature allows you to set the heading level for a selected text. In this example, the selected text is set to a level 2 heading (H2).
editor.chain().focus().toggleHeading({ level: 2 }).run()
Check Heading Level
This feature allows you to check if the current selection is a heading of a specific level. In this example, it checks if the selection is an H1 heading.
const isHeading = editor.isActive('heading', { level: 1 })
prosemirror-schema-basic provides a basic schema for ProseMirror, including heading nodes. It is more low-level compared to @tiptap/extension-heading and requires more manual setup.
draft-js is a rich text editor framework for React. It includes support for headings, but the API and configuration are different from Tiptap. It is more integrated with React and offers a different set of features.
quill is a modern WYSIWYG editor built for compatibility and extensibility. It supports headings out of the box and offers a different user experience and API compared to Tiptap.
Tiptap is a headless wrapper around ProseMirror – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as New York Times, The Guardian or Atlassian.
Documentation can be found on the Tiptap website.
Tiptap is open sourced software licensed under the MIT license.
FAQs
heading extension for tiptap
The npm package @tiptap/extension-heading receives a total of 448,268 weekly downloads. As such, @tiptap/extension-heading popularity was classified as popular.
We found that @tiptap/extension-heading demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.